Source for file config.php
Documentation is available at config.php
* This file groups classes that are used to manage configuration.
* @author Antoine d'Otreppe de Bouvette <a.dotreppe@aspyct.org>
* @license http://www.opensource.org/licenses/mit-license.php
* Provides an access to configuration sections and items.
* Returns an array containing values defined inside $section
* @throws MisconfigurationException
* Returns a configuration $item from a $section
* @throws MisconfigurationException
* A configuration built with a .ini file.
* Holds the configuration items and sections.
* @var string[string][string]
* Throws a MisconfigurationException if the file is missing, could not be
* @param string $filename path to config file.
* @throws MisconfigurationException
if ($this->config === false) {
'Could not read or parse config file at ' . $filename
* @see WebCommons/Config::getItem()
public function getItem($section, $item) {
$section = self::getSection($section);
'No such configuration item: ' . $item);
* @see WebCommons/Config::getSection()
return $this->config[$section];
'No such configuration section: ' . $section);
* Exception thrown when the configuration could not be read
* or when a requested configuration item is missing.
|